//win_system.cpp - General system query functions such as time, RAM, HDD space, etc.

#include "precompiled_header.h"
#include "win_system.h"

void SystemInit(void)
{
	//Initialize timer
	timeBeginPeriod(1);
	SystemGetUptime();

	//Grab OS version
	win32.osInfo.dwOSVersionInfoSize = sizeof(win32.osInfo);

	if(!GetVersionEx((LPOSVERSIONINFO)&win32.osInfo))
	{
		//printf("Failed to get OS info!\n");
	}

	//Grab CPU architecture and support
}

int SystemGetUptime(void)
{
	int mm_currtime;
	static int mm_basetime;
	static bool initialized = false;

	if(!initialized)
	{
		mm_basetime = timeGetTime();
		initialized = true;
	}

	mm_currtime = timeGetTime() - mm_basetime;
	return mm_currtime;
}